package propertiesio;

import java.io.FileWriter;
import java.io.IOException;
import java.util.Properties;

public class Demo4 {
    public static void main(String[] args) throws IOException {
        //void store 将集合中的数据以键值对形式保存本地
        Properties pro = new Properties();
        pro.put("zhangsan","1111");
        pro.put("lisi","2222");

        FileWriter fw = new FileWriter("abc.properties");
        pro.store(fw,null);
        fw.close();
    }
}
